package com.jing.shop.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "用户表")
public class User {

    @NotBlank(message = "用户名不能为空")
    @Length(min = 3,max = 6,message = "用户名长度不能低于3个字符且不能超过6个字符")
    @ApiModelProperty(value = "用户名，不能为空，长度不能低于3个字符且不能超过6个字符")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码，不能为空")
    private String passWord;

}
